/*
Diana Mutz	
Title: The Political Impact of Others' Job Loss: Personifying the Enemy

HYPOTHESES
	
Stated-Hyp1: Those shown a news story about a man's job loss attributed to trade will exhibit greater negative emotional reactions than an identical news story in which job loss is attributed to automation.

	Test-Hyp1: Job loss due to trade vs. automation elicits more negative emotional reaction.

Stated-Hyp2: Those shown a news story about a man's job loss attributed to trade will attribute more negative attitudes toward international trade relative to an identical news story in which job loss is attributed to automation.

	Test-Hyp2: Job loss due to trade vs. automation elicits more negative attitudes towards trade.

Stated-Hyp3: Those shown a news story about a man's job loss attributed to trade will be more likely to believe that manufacturing jobs can be recovered relative to those shown an identical news story in which his job loss is attributed to automation.

	Test-Hyp3: Job loss due to trade vs. automation elicits belief that more manufacturing jobs can be recovered.
	
	Test-Hyp4: Job loss due to trade vs. automation decreases belief that more manufacturing jobs CANNOT be recovered.
	
Stated-Hyp4: Those shown a news story about a man's job loss attributed to trade will increase in national ethnocentricism relative to those shown an identical news story in which his job loss is attributed to automation.

	* cannot test because there is no measure of ethnocentrism 
	
Stated-Hyp5: Those shown a news story about a man's job loss attributed to trade will be more likely to percieve that negative stereotypes about the trading partner country are normatively acceptable than those shown an identical news story in which his job loss is attributed to automation.

	Test-Hyp5: Job loss due to trade vs. automation makes negative stereotypes of trading partner normatively acceptable.
	
Stated-Hyp6: "Additional hypotheses can be tested using a control condition in which the respondent reads the same story unattributed to job loss. A third, control condition will allow me to ascertain what the current default interpretation is related to job loss. I hypothesize that most people will assume that any job loss in manufacturing is likely due to trade, even when there is no information provided"

	Test-Hyp6: Job loss due to trade vs. control DOES NOT elicit more negative emotional reaction.
	Test-Hyp7: Job loss due to trade vs. control DOES NOT elicit more negative attitudes towards trade.
	Test-Hyp8: Job loss due to trade vs. automation DOES NOT elicit belief that more manufacturing jobs can be recovered.
	Test-Hyp9: Job loss due to trade vs. automation DOES NOT decrease belief that more manufacturing jobs CANNOT be recovered.
	Test-Hyp10: Job loss due to trade vs. control DOES NOT make negative stereotypes of trading partner normatively acceptable.
	
	
********************************************************************************	
* NOTES
*/

clear all
use "TESS008_MUTZ_31October17.dta", clear


* CONSTRUCT INDICATORS OF EXPERIMENTAL MANIPULATIONS

* reason for job loss
	clonevar treatment= P_TREATMENT 
	
	* automation vs. trade treatment; recoding to exclude control 
	recode treatment (2=1) (3=0) (*=.), gen(jobloss_trade)
	lab def trade 1 "job loss due to trade" 0 "job loss due to automation"
	lab val jobloss_trade trade
	tab jobloss_trade, mis
	
	*trade vs. control
	recode treatment (2=1) (3=.) (1=0), gen(jobloss_trade_control)
	lab def trade2 1 "job loss due to trade" 0 "control"
	lab val jobloss_trade_control trade2
	tab jobloss_trade_control, mis	
	
	
* CONSTRUCT OUTCOME MEASURES

* emotional reactions 
	
	clonevar sad = Q2A 
	clonevar angry = Q2B 
	clonevar resentful = Q2C

	* variables are reverse-coded; correcting so higher values show neg emotions; recode missing
	lab def agree 1 "strongly disagree" 5 "strongly agree"
	foreach var of varlist sad angry resentful {
	recode `var' (1=5) (2=4) (3=3) (4=2) (5=1) (*=.)
	
	lab val `var' agree
	tab `var'
	}
	
	* create summated scale for negative emotions
	gen neg_emotions = sad+angry+resentful
	tab neg_emotions, mis
	
* attitudes toward international trade

	* higher values mean more negative attitude
	clonevar bad_trade = Q4	// should govt encourage trade?
	clonevar bad_globalize = Q5 // is globalization good?
	clonevar bad_freetrade = Q6 // is free trade good?
	clonevar bad_hurteconomy=Q7 // trade hurt the US economy
	
	* recode missing
	foreach var of varlist bad_* {
	replace `var' = . if `var' ==98
	
	tab `var'
	}
	
	* Q7 is coded weird. recode bad_hurteconomy
	lab def q7revised 1 "helped economy" 5 "hurt economy"
	recode bad_hurteconomy (1=1) (2=2) (5=3) (3=4) (4=5)
	lab val bad_hurteconomy q7revised
	replace bad_hurteconomy = bad_hurteconomy*4/5
	
	* create summated scale
	gen neg_tradeattitude = bad_trade + bad_globalize+ bad_freetrade + bad_hurteconomy
	tab neg_tradeattitude, mis
	
* believe that manufacturing jobs can be recovered
	
	clonevar jobsback_possible = Q3A 
	clonevar jobsback_impossible = Q3B
	
	* recode missing
	foreach var of varlist jobsback_* {
	replace `var' = . if `var' ==98
	
	tab `var'
	}
	
	
* negative stereotypes about trading partner

	/* 
	These questions asked if it is appropriate to make the following 
	statements.
	*/

	clonevar norm_deserving =Q8A // Americans are more deserving than Chinese 
	clonevar norm_baddriver= Q8B // Asians are bad drivers
	clonevar norm_innovative = Q8C // Americans more innovative than Chinese 
	clonevar norm_takeover = Q8D // China is taking over the country
	clonevar norm_jobtheft = Q8E // China is stealing jobs

	
	*variable is reverse coded (higher values means not ok to say this)
	// recoding so higher values mean ok to say
	lab def norm 1 "Def not appropriate" 2 "Probably not appropriate"3 "Probably appropriate" 4 "Definitely appropriate"
	
	foreach var of varlist norm* {
	replace `var'= . if `var'==98		
	recode `var' (1=4) (2=3) (3=2) (4=1) 
	lab val `var' norm
	
	tab `var', mis
	}	
	
	* create summated scale 
	gen stereotype_acceptable= norm_deserving+ norm_baddriver+ norm_innovative+norm_takeover + norm_jobtheft
	tab stereotype_acceptable, mis
	
********************************************************************************
* ANALYSIS

*Test-Hyp1: Job loss due to trade vs. automation elicits more negative emotional reaction.
	reg neg_emotions i.jobloss_trade
		// do not reject - 0.000 
	tess 1.jobloss_trade +, init(Mutz886) bonf(5)
		
*Test-Hyp2: Job loss due to trade vs. automation elicits more negative attitudes towards trade.
	reg neg_tradeattitude i.jobloss_trade
		// do not reject - 0.000 
	tess 1.jobloss_trade +, bonf(5)
	
*Test-Hyp3: Job loss due to trade vs. automation elicits belief that more manufacturing jobs can be recovered.
	reg jobsback_possible i.jobloss_trade	
		// reject 0.012 
		// test threshold is Bonferroni corrected
		di 0.05/5 // .01
	tess 1.jobloss_trade +, bonf(5)
	
*Test-Hyp4: Job loss due to trade vs. automation decreases belief that more manufacturing jobs cannot be recovered.
	reg jobsback_impossible i.jobloss_trade
		// reject - 0.209 
	tess 1.jobloss_trade -, bonf(5)

*Test-Hyp5: Job loss due to trade vs. automation makes negative stereotypes of trading partner normatively acceptable.
	reg stereotype_acceptable i.jobloss_trade
		// do not reject -  0.000
	tess 1.jobloss_trade +, bonf(5)
	
		* NOTE: hypotheses 6-10 pertain to no difference as null; so difference means reject.
	
	
			
*Test-Hyp6: Job loss due to trade vs. control DOES NOT elicit more negative emotional reaction.
	reg neg_emotions i.jobloss_trade_control
		// reject - 0.000
	tess 1.jobloss_trade_control, bonf(5)
	
*Test-Hyp7: Job loss due to trade vs. control DOES NOT elicit more negative attitudes towards trade.
	reg neg_tradeattitude i.jobloss_trade_control
		// do not reject - 0.557
	tess 1.jobloss_trade_control, bonf(5)
	
*Test-Hyp8: Job loss due to trade vs. automation DOES NOT elicit belief that more manufacturing jobs can be recovered.
	reg jobsback_possible i.jobloss_trade_control	
		// do not reject 0.429
	tess 1.jobloss_trade_control, bonf(5)
	
*Test-Hyp9: Job loss due to trade vs. automation DOES NOT decrease belief that more manufacturing jobs CANNOT be recovered.
	reg jobsback_impossible i.jobloss_trade_control
		// do not reject - 0.893
	tess 1.jobloss_trade_control, bonf(5)

*Test-Hyp10: Job loss due to trade vs. control DOES NOT make negative stereotypes of trading partner normatively acceptable.
	reg stereotype_acceptable i.jobloss_trade_control
		// do not reject -  0.026W
			// test threshold is Bonferroni corrected
			di 0.05/5 // .01	
	tess 1.jobloss_trade_control, bonf(5)
